package com.basics.loan.web.boss.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.basics.loan.web.boss.bean.domain.Role;

/**
 * 角色DAO
 *
 * @author yangxiaobing
 * @date 2017/7/24
 */
@Mapper
public interface RoleMapper {

	int deleteByPrimaryKey(Integer roleId);

	int insert(Role record);

	int insertSelective(Role record);

	Role selectByPrimaryKey(Integer roleId);

	int updateByPrimaryKeySelective(Role record);

	int updateByPrimaryKey(Role record);

	void updateRoleByStatus(Map<String, Object> params);

	Long selectCountRole(Role role);

	List<Role> selectRoleListByPage(Role role);

	List<Role> selectRoleList(Role role);

	Long selectRoleNameCheck(@Param("roleName") String roleName, @Param("roleId") Integer roleId);

	List<Role> selectUserRolesByUserId(@Param("userId") Integer userId);

	List<Role> selectRoleListByStatus();

	List<Role> selectUserRoleByRoleIdList(Integer[] roleId);

	List<Role> selectDeceasedUserRoleByRoleIdList(Integer[] roleId);

}